<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>配送员接单</title>
    <link rel="stylesheet" th:href="@{/static/css/minireset.css}" />
    <link rel="stylesheet" th:href="@{/static/css/common.css}" />
    <link rel="stylesheet" th:href="@{/static/css/cart.css}" />
    <link rel="stylesheet" th:href="@{/static/css/bookManger.css}" />
    <link rel="stylesheet" th:href="@{/static/css/orderManger.css}" />
    <script language="JavaScript" th:src="@{/static/script/courier.js}"></script>
</head>
<body>
<div class="header">
    <div class="w">
        <div class="header-left">
            <h1>待接订单</h1>
        </div>
        <div class="header-right">
            <h3>欢迎<span th:text="${session.loginuser.user_name}">张总</span>光临商城</h3>
            <a th:href="@{/page.do?operate=page&page=login}" class="register">注销</a>
            <div class="gohome">
                <a th:href="@{/Commodity.do}">返回</a>
            </div>
        </div>
    </div>
</div>
<div class="list">
    <div class="w">
        <table>
            <thead>
            <tr>
                <th>订单号</th>
                <th>订单日期</th>
                <th>订单金额</th>
                <th>商品数量</th>
                <th>购买者</th>
                <th>店家</th>
                <th>订单状态</th>
                <th>订单详情</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="order : ${session.orderList}" th:object="${order}">
                <td th:text="*{order_No}">12354456895</td>
                <td th:text="*{#dates.format(order_Date,'yyyy-MM-dd HH:mm:ss')}">2015.04.23</td>
                <td th:text="*{order_Money}">90.00</td>
                <td th:text="*{order_count}">88</td>
                <td th:text="*{user.user_name}">88</td>
                <td th:text="*{seller.user_name}">88</td>
                <td  class="send">
                    <button  th:onclick="|TakeOrder(*{order_ID})|">接单</button>
                </td>
                <td><a th:href="@{/order.do(operate='detail',order_ID = *{order_ID})}">
                    查看详情</a></td>
            </tr>
            </tbody>
        </table>

    </div>
</div>
<div class="header">
    <div class="w">
        <div class="header-left">
            <h1>已接订单</h1>
        </div>
    </div>
</div>
<div class="list">
    <div class="w">
        <table>
            <thead>
            <tr>
                <th>订单号</th>
                <th>订单日期</th>
                <th>订单金额</th>
                <th>商品数量</th>
                <th>购买者</th>
                <th>店家</th>
                <th>订单状态</th>
                <th>订单详情</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="order : ${session.acceptorderList}" th:object="${order}">
                <td th:text="*{order_No}">12354456895</td>
                <td th:text="*{order_Date}">2015.04.23</td>
                <td th:text="*{order_Money}">90.00</td>
                <td th:text="*{order_count}">88</td>
                <td th:text="*{user.user_name}">88</td>
                <td th:text="*{seller.user_name}">88</td>
                <td  class="send" th:if="*{order_status==4}">
                    <p>正在配送</p>
                    <input type="button" value="完成订单" class="btn" style="border-style:none;color: #ff0000"
                           th:onclick="|finishOrder(*{order_ID})|"/>
                </td>
                <td th:if ="*{order_status==5}"> <p>订单已完成</p> </td>
                <td><a th:href="@{/order.do(operate='detail',order_ID = *{order_ID})}">
                    查看详情</a></td>
            </tr>
            </tbody>
        </table>

    </div>
</div>
</body>
</html>
